import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import hotelTable from '@/components/hotelTable'
import order from '@/components/order'
import aliPay from '@/components/aliPay'

/* 供应商列表组件 */
import supplierList from '@/components/supplierList'

/* 已经合作的供应商列表组件 */
import supplierListYes from '@/components/supplierListYes'


/* 主界面组件 */
import indexE from '@/components/indexE'

// 仓库原材料列表
import materialsList from '@/components/materialsList'

// 菜单列表
import menuList from '@/components/menuList'
// 套餐列表
import menuPkgList from '@/components/menuPkgList'

import matSup from '@/components/matSup'

/* 已经合作的供应商列表组件 */
import memberList from '@/components/memberList'

import billList from '@/components/billList'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: login
    },


    {
      path: '/indexE',
      name: 'indexE',
      component: indexE,
      /* 配置子路由, 用于同一个页面的跳转 */
      children: [
        /* 合作供应商列表 */
        {
          path: 'supplierListYes', // 子路由的path没有"/"
          name: 'supplierListYes',
          component: supplierListYes,
        },

        /* 所有供应商列表 */
        {
          path: 'supplierList',
          name: 'supplierList',
          component: supplierList
        },

        /* 所有会员列表 */
        {
          path: 'memberList',
          name: 'memberList',
          component: memberList
        },


        {
          path: 'menuList',
          name: 'menuList',
          component: menuList
        },

        {
          path: 'materialsList',
          name: 'materialsList',
          component: materialsList
        },

        {
          path: 'matSup',
          name: 'matSup',
          component: matSup
        },

        {
          path: 'billList',
          name: 'billList',
          component: billList
        },

        {
          path: 'menuPkgList',
          name: 'menuLPkgist',
          component: menuPkgList
        },

        {
          path: 'hotelTable',
          name: 'hotelTable',
          component: hotelTable
        },

        {
          path: 'order',
          name: 'order',
          component: order
        },

        {
          path: 'aliPay',
          name: 'aliPay',
          component: aliPay
        },

      ]
    },





  ]
})
